package controller.room
{
	
	import events.room.EventCurrentPerspectiveChange;
	import model.ModelRooms;
	import org.robotlegs.mvcs.Command;
	
	public class CommandCurrentPerspectiveChange extends Command
	{
		[Inject]
		public var e:EventCurrentPerspectiveChange;
		
		[Inject]
		public var mr:ModelRooms;
		
		override public function execute() : void {
			if (e.perspective != null) {
				mr.currentPerspective = e.perspective;
			}else {
				mr.currentPerspective = null;
			}
			
		}
	}
}